package com.tmt.im.common.pojo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.tmt.im.common.annotation._AllowUpdate;
import com.tmt.im.common.enums.ChannelType;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.SuperBuilder;
import org.apache.ignite.cache.query.annotations.QuerySqlField;

import java.io.Serial;
import java.sql.Timestamp;

/**
 * @Description TODO
 * @Author wuyi
 * @Date 2024/10/23 15:45
 * @Version 1.0
 **/
@Getter
@Setter
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
public class WithdrawBindingParamPoJo implements IGetKey<Long> {

    public static final String CACHE_NAME = "withdraw_binding_param";

    @Serial
    private static final long serialVersionUID = -4218973235069259664L;

    @QuerySqlField(name = "id", index = true)
    private Long id;

    /**
     * 支付类型
     */
    @QuerySqlField(name = "channel_type")
    private String channelType;

    /**
     * 支付宝账号或银行卡号
     */
    @QuerySqlField(name = "bank_card_account")
    @_AllowUpdate
    private String bankCardAccount;

    /**
     * 开户行信息
     */
    @QuerySqlField(name = "open_account_bank")
    @_AllowUpdate
    private String openAccountBank;

    /**
     * 微信收款人昵称、支付宝收款人(真实姓名)、开户人姓名
     */
    @QuerySqlField(name = "account_holder")
    @_AllowUpdate
    private String accountHolder;

    /**
     * 收款二维码文件在OSS中的访问路径。
     */
    @QuerySqlField(name = "file_uri")
    private String fileUri;

    @QuerySqlField(name = "creator_id")
    private String creatorId;

    @QuerySqlField(name = "create_time")
    @_AllowUpdate
    private Timestamp createTime;

    @QuerySqlField(name = "version")
    @_AllowUpdate
    private Long version;

    @JsonIgnore
    private boolean insert;

    @Override
    public Long getKey() {
        return id;
    }

}
